package com.allwees.bs.core.model.order.wf.order;

import com.baomidou.mybatisplus.core.enums.IEnum;
import com.allwees.core.wf.Action;

/**
 * 订单相关动作
 *
 * @author yangylsky
 * @since 2019-09-17
 *
 */
public enum EOrderItemAction implements Action, IEnum<String> {
	//USER ACTION
	USER_CREATE,

	USER_PAYED,

	USER_COD,

	USER_CANCEL,

	USER_COD_CANCEL_ON_LIMIT,

	USER_COD_CANCEL_AFTER_LIMIT,

	LOGISTICS_DELIVERED,

	USER_CONFIRM_RECEIVED,

	USER_REVIEWED,

	USER_REQUEST_REFUND_WITH_RECEIVED,
	USER_REQUEST_REFUND_WITH_WAIT_SHIP,
	/**
	 * 准备期内商家取消发货
	 */
	RETAILER_CANCEL_SHIPPED_ON_LIMIT,

	/**
	 * 准备期外商家取消发货
	 */
	RETAILER_CANCEL_SHIPPED_AFTER_LIMIT,

	PLATFORM_CANCEL_SHIPPED,

	//end of USER ACTION

	//MERCHANT ACTION
	MERCHANT_SHIPPED,

	//end of MERCHANT ACTION

	//PLATFORM ACTION

	PLATFORM_CONFIRM_REFUND,
	PLATFORM_REJECT_REFUND,

	//end of PLATFORM ACTION

	//SYSTEM ACTION
	/**
		 * 退款完成
		 */
	CASH_REFUNDED,
	/**
	 * 自动取消过期未支付的订单
	 */
	SYSTEM_CANCEL_BY_UNPAID,

	/**
	 * 自动关闭5天未发货的订单
	 * 待发货订单，从订单变成【待发货】状态的日期开始算，5天以后还未填写发货记录，则系统自动退款给买家，订单取消，状态变成【交易关闭】。
	 */
	SYSTEM_CLOSE_BY_SHIPPING_OVER_TIME,

	/**
	 * 45天前发货，还处于已发货状态的订单自动关闭
	 */
	SYSTEM_AUTO_RECEIVED_BY_AFTER_SHIPPING,
	;
	//end of SYSTEM ACTION

	@Override
	public String getValue() {
		return name();
	}
}
